Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove format function and replace with formatDate #7409

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

paulgain
Copy link
Contributor

@paulgain paulgain commented Dec 16, 2024

Description of change

This PR simplifies the use of date utilities by replacing instances of format with formatDate.

There are still a few remaining format functions that require further refactoring in the following files:

  • src/apps/transformers.js
  • src/client/transformers/index.js
  • src/client/utils/date.js
  • src/config/nunjucks/trade-elements-filters.js

These will be addressed in a future PR, for now I've deprecated the format function.

Checklist

  • Has the branch been rebased to main?
  • Automated tests (Any of the following when applicable: Unit, Functional or End-to-End)
  • Manual compatibility testing (Browsers: Chrome, Firefox, Edge, Safari)

@paulgain paulgain force-pushed the fix/replace-format-with-format-date branch from 0d1f14f to 5bc7062 Compare December 16, 2024 12:40
Copy link

cypress bot commented Dec 16, 2024

data-hub-frontend    Run #58097

Run Properties:  status check passed Passed #58097  •  git commit 7ff44b2dea: Add a deprecation warning to the format function in date.js, recommending the us...
Project data-hub-frontend
Branch Review fix/replace-format-with-format-date
Run status status check passed Passed #58097
Run duration 08m 15s
Commit git commit 7ff44b2dea: Add a deprecation warning to the format function in date.js, recommending the us...
Committer Paul Gain
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 4
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 75
View all changes introduced in this branch ↗︎

@paulgain paulgain force-pushed the fix/replace-format-with-format-date branch from c9fdae6 to 2c46ab9 Compare December 16, 2024 16:34
@paulgain paulgain force-pushed the fix/replace-format-with-format-date branch from 20f914d to d278390 Compare December 17, 2024 07:50
@paulgain paulgain force-pushed the fix/replace-format-with-format-date branch from 07b69c7 to ae050e2 Compare December 17, 2024 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant